package admin.board.category.action;

import admin.board.category.dao.CategoryDao;

import com.opensymphony.xwork2.ActionSupport;

public class DeleteAction extends ActionSupport {
	private CategoryDao dao;
	private Integer category_no=0;
	private String msg;
	
	public DeleteAction() {
		dao = CategoryDao.getInstance();
	}
	
	public void setCategory_no(int category_no) {
		this.category_no = category_no;
	}
	
	public String getMsg() { return msg; }
	
	public String execute() throws Exception {
		dao.delete(category_no);
		msg = "Delete Category : " + category_no;
		
		return SUCCESS;
	}
}
